import static java.lang.Math.PI;
import static java.lang.Math.sqrt;

public class Circle {
    public int x;
    public int y;
    public int r;
    public Circle(int x,int y,int r){
        this.x=x;
        this.y=y;
        this.r=r;
    }
    public void getArea(){
        double area=PI*r*r;
        System.out.println("面积为："+area);
    }
    public void getPerimeter(){
        double perimeter=2*PI*r;
        System.out.println("周长为："+perimeter);
    }
    public void isIntersect(Circle c){
        double newX=this.x-c.x;
        double newY=this.y-c.y;
        double d=sqrt(Math.pow(newX,2)+Math.pow(newY,2));
        int dr=this.r+c.r;
        if(d<dr){
            System.out.println("相交");
        }else{
            System.out.println("不相交");
        }
    }

    public static void main(String[] args) {
        Circle c1=new Circle(3,4,6);
        Circle c2=new Circle(4,5,8);
        c1.getArea();
        c2.getPerimeter();
        c1.isIntersect(c2);
    }
}
